﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Runtime.Serialization;
using System.Web;

namespace AgileNYCWebService.Manager.Data.Table
{
	public class Ratings : BaseClass
	{
		public Ratings()
			: this(null)
		{

		}

		public Ratings(DataRow row)
			: base(row)
		{
			if (row != null)
			{
				if (row.Table.Columns.Contains("UserId"))
					UserId = row["UserId"].GetInteger(-1);
				if (row.Table.Columns.Contains("EventId"))
					EventId = row["EventId"].GetInteger(-1);
				if (row.Table.Columns.Contains("Rating"))
					Rating = row["Rating"].GetDouble(0.0);
			}
		}

		public int UserId { get; set; }
		public int EventId { get; set; }
		public double Rating { get; set; }
	}
}